package ch10;

/**
 * Created by HaoChen on 2016/4/10.
 */
        import java.io.FileInputStream;
        import java.io.IOException;
        import java.util.Scanner;

public class StreamStandardIn {
    public static void main(String[] args) throws IOException {
        System.setIn(new FileInputStream(args[0]));
        try (Scanner scanner = new Scanner(System.in)) {
            while (scanner.hasNextLine()) {
                System.out.println(scanner.nextLine());
            }
        }
    }
}
